package com.mes.cloud.util;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;

import java.util.Map;

/**
 * json处理工具类
 * Created by pactera on 2017-07-18.
 */
public class JsonUtil {
    /**
     * 将json转化成map
     * @param jsonStr
     * @return
     */
    public static Map<String, String> convertJsonStrToMap(String jsonStr){
        Map<String, String> map = JSON.parseObject(
                jsonStr,new TypeReference<Map<String, String>>(){} );
        return map;
    }
}
